package org.railage.client.beans;

import java.util.Arrays;
import java.util.List;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

import org.railage.common.dto.TripDTO;
import org.railage.server.services.TripService;

@ManagedBean(name = "trips")
@ViewScoped
public class TripsBean {
	
	private TripService tripService = new TripService();

	private List<TripDTO> trips = null;
	
	public TripsBean() {
		trips = Arrays.asList(tripService.getAllTrips(null));
	}

	public List<TripDTO> getTrips() {
		return trips;
	}
	
}
